Functions

Forecasting

Is there a trend?

We will check startionarity by performing a Augmented Dickey-Fuller Test

p-value of 0.067936

We will have to remove the trend. Basically taking each data point and subtract the datapoint from the month that comes prior.

Straightaway we can see that now the time series is distributed around 0. Now let's perform the ADF test to see.

p-value of 0!!!

We can now move on with the model.

ACF

There seems to exist some repetition in 4 to 4 marks (Maybe Monthly???), however those may not be enough to warrant seasonality.

Maybe a seasonal MA of 1 month?

PACF

There seems to exist some repetition in 3 to 4 lags (Maybe Monthly???), however those may not be enough to warrant seasonality.

Maybe a seasonal AR of 1 month?

Setting up Train and Test Data

Fit the SARIMA Model

CONCLUSION FROM THE FIRST FORECAST

After testing the models for sucessive iterations we tried to better understand the relation, troughout time the and as we go further into the forecast the errors normally tend to increase.

TO NOTE: The first 5 forecasts are really good and from there normally the forecasts tended to get worse

By using seasonal 1 year lag on forecast we managed to get the significantly better results than with monthly lags.

Rolling Forecast Origin

Forecast Functions by POS

Roling Forecast Functions

Functions By Product

Functions By Product & POS